<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/oa/reimburseManager.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			var page = sys_fill_parm('queryForm');
			query_reimburseManager(page);
		}
	});
	$('#queryForm').find("input:checkbox, input:radio").not('input.ibtn').uniform();
});

function rb_excel() {
	var suc = '';
	$('#ptypeObjList').find('.pc').each(function () {
		suc += $(this).val() + ',';
	});
	var oc =$('#oc option:selected') .val();
	console.log(oc);
	var project =$("#project").val();
	var time1 =$("#time1").val();
	var time2 =$("#time2").val();
	if (suc.length > 0) {
		suc = suc.substring(0, suc.length - 1);
		//window.location.href = "${contextPath}m/workplan-excelExport.html?" + '&suc=' + suc + '&pageSize=10' + $('#queryForm').serialize();
		var url = create_url('reimburseManager-excel') + '&oc=' + oc +'&time1=' + time1 +'&time2=' + time2 + '&suc=' + suc;
	}else{
		var url = create_url('reimburseManager-excel') + '&oc=' + oc +'&time1=' + time1 +'&time2=' + time2;
	}
	
	window.location.href = url;
} 

</script>

<#import "/freemarker/modeltype.ftl" as mt>

<div class="widget">
	<div class="widget-content">
		<div class="table-title">
			<form id="queryForm">
			<table class="search_term_table">
				<tr>
					<th style="width: 70px;">报销类别</th>
					<td>
						<div class="input-group">
							<div id="ptypeObjList" class="cjr"></div>
							<button class="btn btn-primary" onclick="javascript: selectUser_reimburseManager($(this));return false;" title="选择该物品所属类型" type="button"><i class="icon-search"></i></button>
						</div>
						<!-- <input id="cn" type="text" name="cn" style="width:100px;"> -->
					</td>
					<th style="width: 70px;">创建部门</th>
					<td>
						<select class="uniformselect" name="oc" id="oc">
							<option value="">请选择</option>
							<#list organ as o>
							<option value="${(o.code)!''}">${(o.name)!'' }</option>
							</#list>
						</select>
					</td>
					<td style="text-align: right;">
						<a href="javascript:;" class="btn btn-info" onclick="javascript: query_reimburseManager();return false;">
							<i class="fontello-icon-search"></i>&nbsp;查&nbsp;&nbsp;询&nbsp;
						</a>
					</td>
					<td style="text-align: right;">
						<a href="javascript:;" class="btn btn-info" onclick="javascript: rb_excel();return false;">
							<i class="fontello-icon-search"></i>&nbsp;导&nbsp;&nbsp;出&nbsp;
						</a>
					</td>
				</tr>
				<tr>
					
					<th style="width: 70px;">是否通过</th>
					<td><@mt.YesOrNo r=true name='pass' d=false mc=true className="formwrapper"/></td>
					<th style="width: 70px;">创建时间</th>
					<td><input id="time1" type="text" name="time1" style="width:100px;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
						到
						<input id="time2" type="text" name="time2" style="width:100px;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
					</td>
				</tr>
			</table>
			</form>
			<div id="tempListDiv" style="display:none;">
				<div class="filter-table rep" style="margin-left:5px; margin-bottom:5px;">
					<input class="pc" type="hidden" />
					<button type="button" class="close" data-dismiss="alert" onclick="javascript: delete_reimburseManager($(this));">&times;</button>
					<a class="title" href="#"></a>
				</div>
			</div>
			<div id="ResultList"></div>
		</div>
	</div>
</div>
